Skip to main content

XPDFViewer_GetSelectionRect

Type

function

Summary

Get the rect of the portion of the selection that appears on the currently loaded page.

Syntax

XPDFViewer_GetSelectionRect(<viewerName>[, <pageNumber>])

Description

Get the rect of the portion of the selection that appears on the currently loaded page. If there is no selection on the current page the function returns 0,0,0,0. Coordinates are in stack coordinates. Adjust the returned rect by the topLeft of the RECT property (viewport) to get coordinates relative to the PDF page.

The following errors may be thrown by the command:

  • XPDF_ERROR: incorrect number of parameters
  • XPDF_ERROR: PDF viewer not found

Parameters

NameTypeDescription

viewerName

string

The name of the viewer.

pageNumber

integer

An optional pageNumber parameter may be used to get the rect of the selection or portion of selection that appears on the given page.

Examples

put XPDFViewer_GetSelectionRect("Document1") into theSelectionRect

Compatibility and Support

Introduced

LiveCode 1.0.0

OS

mac

windows

Platforms

desktop

Thank you for your feedback!

Was this page helpful?